/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.drive.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.act.base.EnableFlowSearch;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 开停车申报
 *
 * @author pig
 * @date 2023-11-02 09:27:34
 */
@Data
@TableName("base_drive_stop_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "开停车申报")
public class BaseDriveStopRecordEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    @EnableFlowSearch()
    private Long orgId;

    /**
     * 装置设施名
     */
    @Schema(description = "装置设施名")
    @EnableFlowSearch(fuzzyQuery = true)
    private String facilityName;

    /**
     * 开停车地点
     */
    @Schema(description = "开停车地点")
    private String facilityAddr;

    /**
     * 定位
     */
    @Schema(description = "定位")
    private String factilityLocation;

    /**
     * 范围选择
     */
    @Schema(description = "范围选择")
    private String factilityScope;

    /**
     * 开停车编号
     */
    @Schema(description = "开停车编号")
    private String recordCode;

    /**
     * 开停车类型
     */
    @Schema(description = "开停车类型")
    private String recordType;

    /**
     * 开停车状态
     */
    @Schema(description = "开停车状态")
    private String recordStatus;

    /**
     * 开停车原因
     */
    @Schema(description = "开停车原因")
    private String recordReason;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private Date startDate;

    /**
     * 截止时间
     */
    @Schema(description = "截止时间")
    private Date stopDate;

    /**
     * 方案描述
     */
    @Schema(description = "方案描述")
    private String optionDesc;

    /**
     * 附件
     */
    @Schema(description = "附件")
    private String attachment;


    public String getOrgIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.orgId);

    }


    public String getRecordTypeStr() {
        return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.drive_record_type, this.recordType);

    }

    public String getRecordStatusStr() {
        return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.audit_status, this.recordStatus);

    }


}
